package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.SetmealDTO;
import com.sky.dto.SetmealPageQueryDTO;
import com.sky.entity.Setmeal;
import com.sky.enumeration.OperationType;
import com.sky.myannotation.MyAutoFill;
import com.sky.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.List;

public interface SetmealMapper {

    List<Setmeal> findCategoryById(ArrayList<Long> ids);

    @MyAutoFill(OperationType.INSERT)
    void addSetmeal(Setmeal setmeal);

    @Select("select * from setmeal where id = #{id}")
    Setmeal querySetmealById(Long id);

    Page<SetmealVO> querySetmealPage(SetmealPageQueryDTO setmealPageQueryDTO);

    @MyAutoFill(OperationType.UPDATE)
    void updateSetmeal(Setmeal setmeal);
}
